<?php
/**
 * @notes:
 * @return
 * @author: admin
 * @date: 2024/9/11
 */
namespace addons\shopro\validate\tokens;

use think\Validate;

class Trade extends Validate
{

    protected $rule = [
        'order_num' => 'require|alphaNum',
        'rep_password' => 'require|alphaDash',
        'number' => 'require|float',
        'price' => 'require|float',
    ];

    protected $message  =   [
        'order_num.require'     => '请输入订单参数',
        'rep_password.require'     => '请填写支付密码',
        'order_num.alphaNum'     => '订单参数错误',
        'rep_password.alphaDash'     => '密码格式不正确，字母和数字，下划线_及破折号-',

        'number.require'     => '请填写数量',
        'number.float'     => '数量输入错误',
        'price.require' => '价格必须输入',
        'price.float' => '价格参数错误',
    ];

    protected $scene = [
        'submit'  =>  ['order_num', 'rep_password'],
        'open'  =>  ['number', 'price','rep_password'],

    ];


}